package behaviorpattern.nullobject;

public class CustomerFactory {
	private static final String[] items = {"Rob", "Joe", "Julie"};
	
	public static AbstractCustomer getCustomer(String name) {
		for(int i = 0; i < items.length; i ++) {
			if(items[i].equalsIgnoreCase(name)) {
				return new RealCustomer(name);
			}
		}
		
		return new NullCustomer();
	}
}
